package com.zlx.guguanjia.controller;

import com.zlx.guguanjia.entity.Result;
import com.zlx.guguanjia.service.WorkOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @Author 周罗校
 * @Description
 * @ClassName WorkOrderController
 * @date 2020.10.28 12:47:41
 * 该版权归周罗校所有，最终解释权以官方为准
 */
@RestController
@RequestMapping("/manager/work/admin")
public class WorkOrderController {
    @Autowired
    private WorkOrderService service;


    @GetMapping("selectPage/{start}/{pageSize}")
    public Result selectPage(@PathVariable("start") int start,@PathVariable("pageSize") int pageSize,@RequestParam Map<String,Object> condition){
        return new Result(service.selectPage(start,pageSize,condition));
    }

    @GetMapping("selectById/{id}")
    public Result selectById(@PathVariable("id") Long id){
        return new Result(service.selectById(id));
    }
}
